<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script  lang="ts">
// 装饰器是对现有的类或属性进行一个补充
import { Component, Vue } from "vue-property-decorator";
import { Action } from "vuex-class";
@Component({
  // 引入组件
  components: {},
})
// App组件继承vue
export default class App extends Vue {
  // 存储用户信息,给setUser设置any类型
  @Action("setUser") setUser: any;
  // 阻止页面刷新token丢失
  created() {
    this.setUser(localStorage.tsToken);
  }
}
</script>
<style lang="scss">
#app {
  width: 100%;
  height: 100%;
  // overflow-y: scroll;
}
</style>
